package com.myproject.mall.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.myproject.mall.domain.enums.IssueStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@TableName("scmall_coupon_issue")
@Schema(description = "优惠券发放")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class CouponIssue {
    @Schema(description = "发放ID")
    @TableId(value = "issue_id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "优惠券ID")
    @TableField(value = "issue_coupon_id")
    private Integer couponId;

    @Schema(description = "索有用户ID")
    @TableField(value = "issue_user_id")
    private String userId;

    @Schema(description = "发放状态")
    @TableField(value = "issue_status")
    private IssueStatus status;

    @Schema(description = "发放时间")
    @TableField(value = "issue_create_time")
    private LocalDateTime createTime;
}
